/**
 * Created by bai on 2015-10-29.
 */
var app=angular.module('app',['ngRoute','CONTROLLER','service']);
app.config(function($routeProvider){
    $routeProvider.when('/child1',{
        templateUrl:'child1.html',
        controller:'childFirst'
    }).when('/child2',{
        templateUrl:'child2.html',
        controller:'childSecond'
    }).otherwise({
        redirectTo: '/child1'
    })
})

app.controller('Allcontroller',function($scope,$location,BACK){
    $scope.back=function(){
        //alert(1)
        BACK.backTo();
    }
})